<%@ page language="java" import="java.util.*,com.hs.core.cache.*,com.hs.dnms.model.*" pageEncoding="utf-8"%>
 <%
   String maganame = (String)request.getAttribute("maganame");
  String nianfen = (String)request.getAttribute("nianfen");
  String orderName = (String)request.getAttribute("orderName");
  String orderNum = (String)request.getAttribute("orderNum"); 
  PageUtil pageUtil = (PageUtil)request.getAttribute("prodatalist"); 
     
  String pageStr = ""; 
  int perpageCount = 1;
  int currentPage = 1;
  List dataList = null; 
  if(null != pageUtil){
   	dataList = pageUtil.getPageList();
   	pageStr = pageUtil.getPageStr();
   	perpageCount = pageUtil.getNumberPerPage();
   	currentPage = pageUtil.getCurrentPage(); 
  }
  %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<%@ include file="../../include.jsp"%>  
<script language="javascript" type="text/javascript" src="<%=path %>/thirtpart/My97DatePicker/WdatePicker.js"></script>
<script src='<%=basePath%>dwr/interface/dataProhelper.js'></script>  
<script language="javascript" type="text/javascript">
function dataPro(id){
	window.location.href="<%=basePath%>produce/dataPro.do?id="+id;

}
function submitAudit(id){
     if(confirm("确定要提交审核吗？"))
	 	dataProhelper.submitAudit(id,callback4submitAudit);
}
function callback4submitAudit(){ 
    alert("成功提交审核!");
	window.location.href="<%=basePath%>produce/datafinishlist.do";
}
function viewDetail(id){
	var pageURL = "<%=basePath %>audit/auditlistFrame.do?id=" + id;
	openwindow(pageURL,'1000','800',''); 

}
//题录信息
 function magaInfo(id)
{
	var pageURL = "<%=basePath %>data/magainfo.do?id=" + id;
	openwindow(pageURL,'800','600',''); 
}
</script>
</head>
<body>
<form action="<%=basePath %>produce/datafinishlist.do" name="searchform">
    <table width="100%" border="0" cellspacing="0" cellpadding="0" class="deta_list_sear">
      <tr>
        <td width="15%">
          标题：
        </td>
        <td width="20%">
          <input name="maganame" type="text" class="sear_input" value="<%=maganame==null?"":maganame %>"/>
        </td>  
        <td width="15%">
          出版年份：
        </td>
         <td width="20%">
           <input type="text" class="Wdate" id="nianfen" value="<%=nianfen==null?"":nianfen %>" style="width:100%;vertical-align:middle" name="nianfen"  onFocus="WdatePicker({el:'nianfen',dateFmt:'yyyy'})"  />
         </td>
         <td width="30%" align="left">
            <input   type="submit" value="查询" class="butt4"/>
        </td>
        </tr>
    </table>
</form>
	<table border="0" cellspacing="0" cellpadding="0" class="list">
      <tr>
        <th width="5%">序号</th>  
        <th width="25%">标题</th> 
        <th width="20%">作者</th>
        <th width="15%">出版物</th>
        <th width="10%">加工人员</th>
        <th width="10%">加工状态</th>
        <th width="5%">开始加工</th>
        <th width="5%">提交审核</th>
        <th width="5%">查看</th>
      </tr>
      
      <% if(null != dataList && dataList.size()>0){
      		for(int i =0;i<dataList.size();i++){
      			DnmsMagazine dm = (DnmsMagazine)dataList.get(i);
       %>
      <tr>
        <td align="center"><%= perpageCount*(currentPage-1)+i+1 %></td> 
        <td><a href="javaScript:magaInfo('<%=dm.getId()%>');"><%=dm.getMaganame() %></a></td>
        <td><%=StringUtilTool.NULL2Blank(dm.getAuthor())%></td>
        <td><%=StringUtilTool.NULL2Blank(dm.getPeriodicalname()) %></td>
        <td><%=StringUtilTool.NULL2Blank(dm.getDataproducer()==null?"":dm.getDataproducer().getUserinfo()==null?"":dm.getDataproducer().getUserinfo().getUsername())%></td>
        <td><font color=red><strong>
                    <%=DictCacheUtil.getInst().selectStr4Display(dm.getState()+"","15") %></strong></font></td>
        <td><%if("1".equals(dm.getState())||"4".equals(dm.getState())){ %><input type="button" value="进入加工" onclick="dataPro('<%=dm.getId()%>');" class="but_3"/><%}%></td>
        <td><%if("1".equals(dm.getState())||"4".equals(dm.getState())){ %><input type="button" value="提交审核" onclick="submitAudit('<%=dm.getId()%>');" class="but_3"/><%} %></td>
        <td><input type="button" value="查看" onclick="viewDetail('<%=dm.getId()%>');" class="but_2"/></td>
      </tr>
      
      <%}}else{ %>
      <tr>
        <td align="center" colspan="9"><font color="red">没有待加工数据</font></td>
      </tr>
      <%} %>
    </table>
    

 <div class="page">
     <%=pageStr %>
 </div>
</body>
</html>

